package com.zuoye;

import java.util.Scanner;

public class Demo4 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);//构建输入对象
        System.out.println("请选择顾客类别：\n 1.普通顾客\t2.会员");
        int gk = input.nextInt();//获取客户身份
        System.out.print("请输入购买金额：");
        double money = input.nextDouble();//获取客户折前金额

        if (gk==1){
            if (money<100){
                System.out.println("应付金额为 " + money);
            }else {
                System.out.println("应付金额为 " + money*0.9);
            }
        }else if (gk==2){
            if (money<200){
                System.out.println("应付金额为 " + money*0.8);
            }else {
                System.out.println("应付金额为 " + money*0.75);
            }
        }else {
            System.out.println("身份选择错误");
        }
    }
}
